package com.yc.动态代理;

import org.aspectj.lang.annotation.After;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Component
@Aspect
public class AOP动态代理 {

    @Pointcut("execution(* com.yc.动态代理..*.*(..))")
    public void pointcut(){}

    @Before("pointcut()")
    public void before(){
        System.out.println("前置增强");
    }

    @After("pointcut()")
    public void after(){
        System.out.println("后置增强");
    }



}
